<template>
  <div class="home">
    <!-- <ly-tab
      v-model="selectedId"
      :items="items"
      :options="options"
      @change="handleChange"
			class="flex"
      >
    </ly-tab>
    <router-view></router-view> -->
    <div class="bottom-menu">
			<div class="bottom-menu-item" @click="handleOpen(0)">
				<i class="iconfont icon-ziyuan yellow"></i>
				<span>需要我签署</span>
        <i class="right">{{SumInfo.waitSign}}</i>
				<i class="iconfont icon-right_3 right"></i>
      </div>
      <div class="bottom-menu-item" @click="handleOpen(1)">
				<i class="iconfont icon-wancheng icon-yishouhuo yellow"></i>
				<span>签署完成</span>
        <i class="right">{{SumInfo.sign}}</i>
				<i class="iconfont icon-right_3 right"></i>
			</div>
		</div>
  </div>
</template>

<script>
import { countContractSum } from "./../../api/index";
import { Toast , MessageBox } from 'mint-ui'
export default {
  name: 'home',
  data () {
    return {
      SumInfo:{}
      // selectedId:0, //选择的id
      // items:[
      //   {label:"热门"},
      //   {label:"服饰"},
      //   {label:"鞋包"},
      //   {label:"母婴"},
      //   {label:"百货"},
      //   {label:"食品"},
      //   {label:"内衣"},
      //   {label:"男装"},
      //   {label:"电器"}
      // ],
      // options:{
      //   activeColor: '#e9232c'  //选中颜色
      // },
      // //二级路由路径
      // subRouteUrl:[
			// 	'/home/hot', '/home/dress', '/home/box', '/home/mbaby', '/home/general', '/home/food', '/home/shirt', '/home/man', '/home/ele'
      // ]
    }
  },
  created() {
    this.getCountContractSum();
  },
  methods:{
    getCountContractSum(){
      countContractSum().then(response => {
        this.SumInfo = response.data
        }).catch(()=>{});
    },
     /** 修改按钮操作 */
     handleOpen(row) {
      this.$router.push("/contractlist?type=" + row);
    },
    // handleChange(item,index){
    //   this.$router.replace(this.subRouteUrl[index])   //路由切换
    // }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="stylus" rel="stylesheet/stylus" scoped>
.home
  width 100%
  height 100%

	.bottom-menu
		display flex
		flex-direction row
		justify-content space-between
		flex-wrap wrap
		/* padding-top 20px */
		background white
		.bottom-menu-item
			width 100%
			display flex
			/* flex-direction column */
			align-items center
			padding 30px 5px 30px 0
			margin-left 20px
			border-bottom 1px solid #ddd
			.yellow
				color #0077ff
				font-size 22px
				padding-right 10px
				/* padding-bottom 5px */
			span
				font-weight normal
				font-size 14px
				color #58595b
				width 100%
			.right
        padding-left 8px
				color #999
		:last-child
			border 0 none
</style>
